package pangram

import (
	"regexp"
	"strings"
)

const testVersion = 1

var R1 = regexp.MustCompile(`[a-zA-Z]+`)

func IsPangram(input string) bool {

	if len(input) == 0 {
		return false
	}

	// input = strings.Replace(input, " ", "", -1)
	input = strings.Join(R1.FindAllString(input, -1), "")

	var letters = make([]int, 26)

	for i, r := 0, []rune(strings.ToLower(input)); i < len(r); i++ {
		letters[r[i]-97] = 1
	}
	sum := 0
	for i := 0; i < len(letters); i++ {
		if letters[i] == 1 {
			sum += 1
		}
	}
	return sum == 26
}
